diff options
| author | Adam Soltys <[email protected]> | 2023-09-21 11:59:12 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-09-21 11:59:12 -0700 |
| commit | 0fc21acf8ba14a3f5e306c9829573f3ac7d0e05f (patch) | |
| tree | 59e749043ecdc3730d97e23ebfe56a2258361631 /src/routes/(app)/[username]/generate | |
| parent | 92ff34396242e2a22d0c3f8248dc08451afc7cab (diff) | |
| parent | 3d8943e5bc1fbe7904d04531521f5496962e6efc (diff) | |
| download | coinos-ui-0fc21acf8ba14a3f5e306c9829573f3ac7d0e05f.tar.gz coinos-ui-0fc21acf8ba14a3f5e306c9829573f3ac7d0e05f.zip | |
Merge branch 'master' into swapee
Diffstat (limited to 'src/routes/(app)/[username]/generate')
| -rw-r--r-- | src/routes/(app)/[username]/generate/+page.svelte | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/routes/(app)/[username]/generate/+page.svelte b/src/routes/(app)/[username]/generate/+page.svelte index d8557a01..33bf64c4 100644 --- a/src/routes/(app)/[username]/generate/+page.svelte +++ b/src/routes/(app)/[username]/generate/+page.svelte @@ -13,13 +13,12 @@ let loaded; let gen = async () => { if (!browser) return; + if (user.pubkey) { goto($loginRedirect || `/${user.username}`, { invalidateAll: true }); return; } - setTimeout(() => (loaded = true), 50); - if (!$password) $passwordPrompt = true; try { @@ -51,9 +50,7 @@ } }; - onMount(async () => { - await gen(); - }); + onMount(() => browser && setTimeout(() => (loaded = true) && gen(), 50)); $: $pin?.length === 6 && gen(user); </script> @@ -61,3 +58,6 @@ {#if loaded && user?.haspin && $pin?.length !== 6} <Pin /> {/if} +{loaded} +{JSON.stringify(user)} +{$pin} |
